package com.office.framework.websocket;

import lombok.Data;

/**
 * 聊天用户信息实体
 *
 * @author 数字牧马人
 */
@Data
public class ChatUserInfo {

    /**
     * 用户名
     */
    private String username;

    /**
     * 用户昵称
     */
    private String nickname;

    /**
     * 用户头像
     */
    private String avatar;

    /**
     * 会话ID
     */
    private String sessionId;

    /**
     * 加入时间
     */
    private Long joinTime;

    public ChatUserInfo() {
        this.joinTime = System.currentTimeMillis();
    }

    public ChatUserInfo(String username, String nickname, String avatar, String sessionId) {
        this.username = username;
        this.nickname = nickname;
        this.avatar = avatar;
        this.sessionId = sessionId;
        this.joinTime = System.currentTimeMillis();
    }
}
